<template>
  <el-pagination
    background
    layout="total, prev, pager, next"
    :current-page="current"
    :page-size="size"
    :total="Number(total)"
    @current-change="handlePageChange"
  ></el-pagination>
</template>
<script>
export default {
  props: {
    // 当前页码
    current: {
      type:[ Number, String],
      default: 1
    },
    // 每页展示数量
    size: {
      type:[ Number, String],
      default: 10
    },
    // 总数
    total: {
      type:[ Number, String],
      default: 0
    },
  },
  methods: {
    handlePageChange(val){
      this.$emit('current-change', val);
    }
  }
}
</script>